Method and apparatus for automatically providing network services

ABSTRACT

An embodiment of the invention is directed to a method and apparatus for automatically providing network services in a way that improves upon the prior art. Systems implementing aspects of the invention can, for instance, provide developers with a mechanism for creating Web Services without having to write low-level SOAP, XML, or WSDL code. The system utilizes a rule-based approach to provide a mechanism for dynamically reconfiguring the system with requiring redeployment of the entire system.

FIELD OF THE INVENTION

The invention relates to the field of computer software. Moreparticularly, the invention is directed to computer software configuredto enable systems to provide network services.

BACKGROUND

Computer networks provide users with an efficient way to shareinformation. It is commonplace, for example, for users to exchange datausing collaborative applications such as email or access storedinformation using other data retrieval applications. One of the morewidely used data retrieval applications is referred to as a web browser.Web browsers are typically configured to obtain data from a World WideWeb of interconnected server computers (hereinafter the Web) using anumber of standardized data communication protocols. The Web utilizes aclient-server architecture made up of multiple client computersexecuting a Web Browser application that handles connecting to andretrieving information from one or more server applications.

Once the requested information is retrieved, the Web Browser applicationparses the obtained information and displays aspects of that informationto the user. For example, a user may utilize a Web Browser to access aweb site that provides information served in the form of Hyper-TextMarkup Language (HTML) or in Extended Markup Language (XML). Theportions of HTML or XML information that relate to components intendedfor display are presented to the user via a standard computer display.

The server computer(s) executing at the web site are configured tohandle requests for information by executing a suite of applications.One such a web server application handles requests to transfer data(e.g., HTTP requests), whereas Common Gateway Interface (CGI) programshandle access to data stored in a database and can generate HTMLdocuments that are then transmitted to the requesting user. A web serverwill typically invoke a CGI program when the system receives a requestfrom a client for a particular script. Practical Extension ReportingLanguage (PERL) scripts and other server side scripting languages areexamples of the type of scripts often handled using CGI. Although suchscripts can fulfill many system needs, a problem with using CGI scriptsis that the scripts become increasingly difficult to create whenutilized to access complex data sources or dynamically provideinformation.

Due in large part to the complexity involved when using the scriptingapproach, those of ordinary skill in the art often prefer to useApplication Servers in lieu of writing complex scripts. ApplicationServers have far more flexibility and can provide an effective mechanismfor accessing databases and generating output documents using aframework that enables developers to add new functionality and handletasks such as object persistence, session management, and fail-overprotection. However, programming an interface to an Application Serveris made difficult by the fact that most systems do not have a tightlyconstrained set of end-users. Since it is increasingly common forbusinesses to provide business-to-business services involving multipletypes of end-users, there is a need for a more flexible approach tobuilding Application Server interfaces.

When developing server applications for electronic data providers,developers face several challenges. The end-users of such systems aregenerally not pre-defined. Adequately serving the needs of these usersrequires that the functions implemented to serve the data made availableby the system be modified, or new functions added every time the datarepresentation relating to the served data is modified or new datacontent added. To minimize the cost of adding new functionality ormodifying existing ones, an efficient architecture for interfacing withan Application Server or some other data source is needed. It would, forexample, be highly desirable if developers could reuse existing programcode, minimize the number of locations where the source code must bealtered, and prevent alterations in some parts of the code that affectother functions if such effect is not intentional.

A breed of Web application called Web Services, provides a way toresolve some of the problems and accomplish some of the goals statedabove. Web Services are self-contained, self-describing, modularapplications that can be published, located, and invoked across the Web.Web Services perform functions, which can be anything from simplerequests to complicated business processes. Once a Web Service isdeployed, other applications (and other Web services) can discover andinvoke the deployed service.

Viewed from an application architecture perspective, Web Servicesprovide a method that enables programmatic access to a service which isthen implemented by other kinds of software (e.g., middleware). Accessis achieved through the use of a listener and an interface for exposingoperations supported by a business logic implemented by a traditionalmiddleware platform. The Web Service architecture segments the servicesit provides into discrete functional components generally destined foruse by other server-side software (e.g. CGI programs). Thecomponent-based model involves blocks of software program code, whichprogrammers may reuse to extend the system's capabilities. To exchangedata between servers associated with different business entities,Application Servers at each of the different business entitiescommunicate using mutually recognizable data communication protocols. Anoverview of the various protocols and components of the Web Servicesplatform is helpful for purposes of understanding how the architectureis adapted to provide various services.

The basic platform upon which Web Services are based utilizes eXtensibleMarkup Language (XML), plus Hyper-Text Transport Protocol (HTTP). HTTPis a ubiquitous protocol that acts as the basic mechanism fortransporting data across the Web. XML provides a metalanguage fordevelopers to write specialized languages to express complexinteractions between clients and services or between components of aservice. At the server level the XML data acts as a message that getsconverted to a middleware request and the results converted back to XML.Platform support services, such as discovery, transactions, security,authentication, etc. . . . are provided by other services such as SOAPand the Web Services Definition Language (WSDL). Thus, a fullyfunctioning Web Services platform can be thought of asXML+HTTP+SOAP+WSDL+Universal Description, Discovery and IntegrationService (UDDI). At higher levels, one might also add technologies suchas XAML, XLANG, XKMS, and XFS, although such services are notuniversally accepted as a mandatory part of the Web Services platform.

Even though some of the protocols have overlapping functionality, eachprotocol is generally used for a specific purpose. SOAP, for instance,provides remote invocation, UDDI acts as a kind of trader/directoryservice, WSDL enables the system to express service characteristics,XLANG/XAML provides transaction support for complex web transactionsinvolving multiple web services, and XKMS supports authentication andregistration.

SOAP as it is understood by those of ordinary skill in the art is aprotocol that defines a uniform way of passing XML-encoded data betweencomputers. SOAP also defines a way to perform Remote Procedure Calls(RPCs) using HTTP as the underlying communication protocol. For example,SOAP provides a framework for describing data using XML to transfer databetween computers using existing network infrastructures.

UDDI provides a mechanism for client computers to dynamically locateother web services. This enables business using a UDDI interface, todynamically connect to services provided by other businesses. A UDDIregistry can be thought of as a lookup service for businessapplications. A UDDI registry has two kinds of clients: businesses thatwant to offer a service (and its usage interfaces), and clients who wantto obtain and use the offered service. UDDI is layered over SOAP andassumes that requests and responses are UDDI objects sent as SOAPmessages.

WSDL provides a way for service providers to describe the basic formatof Web Service requests over different protocols or encodings. WSDL isused to describe what a Web Service can do, where it resides, and how toinvoke it. WSDL typically assumes SOAP/HTTP/MIME are to provide theremote object invocation mechanism. UDDI registries describe numerousaspects of Web Services, including the binding details of the service.Thus, WSDL fits into the subset of a UDDI service description.

WSDL defines services as collections of network endpoints or ports. InWSDL the abstract definition of endpoints and messages is separated fromthe network deployment or data format binding information. This allowsthe reuse of abstract definitions of messages (e.g., descriptions of thedata being exchanged and collections of operations such as port types).The protocol and data format information relating to a particular porttype constitutes a reusable binding. A port is defined by associating anetwork address with a reusable binding. Each collection of ports iswhat defines a service. A WSDL document typically defines a networkservice using the following elements:

-   -   Types—a container for data type definitions using some type        system (such as XSD).    -   Message an abstract, typed definition of the data being        communicated.    -   Operation—an abstract description of an action supported by the        service.    -   Port Type—an abstract set of operations supported by one or more        endpoints.    -   Binding—a concrete protocol and data format specification for a        particular port type.    -   Port—a single endpoint defined as a combination of a binding and        a network address.    -   Service—a collection of related endpoints.        So, put simply, WSDL is a template for how services can be        described and used by client computers.

A limitation in using these existing technologies to provide WebServices is that developers must manually write code to access datasources, provide functions called by clients, and retrieve or modify thedata in the data source. This is a laborious process. When the datasource is modified (e.g. by modifying a database schema), the developeris required to manually modify the source code for any Web Servicesaffected by alterations to the data source. This requires that thedeveloper have an intimate level of knowledge about the source codestructure. For the companies that need to maintain such systems, thisprocess is costly and particularly so, when the developer doing themaintenance is different from the one who performed the initialdevelopment. Moreover, each time there is a need to modify the databaseschema, the developer is required to modify many parts of the sourcecode and propagate each of these changes to the clients that interfacewith the system. When an operation is to be added or modified, allaffected services with which the operation (or operation type) isassociated may require modification.

To reduce the development and deployment time, there is a need for amethod and framework that assists developers and other users with theprocess of providing network services (e.g. web services) to end-usersand facilitates the development and deployment of such network services.

DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts an architecture for enabling systems to provide webservices in accordance with one or more embodiments of the invention.

FIG. 2 illustrates the steps involved in developing and serving networkservices in accordance with one or more embodiments of the invention.

FIG. 3 depicts an example interface for providing schema information toassist with the configuration of network services in accordance with oneor more embodiments of the invention.

FIG. 4 depicts an example interface for providing configurationinformation related to one or more web services in accordance with oneor more embodiments of the invention.

FIG. 5 illustrates the steps involved in generating rule sets thatgovern the creation and serving of network services in accordance withone or more embodiments of the invention.

FIG. 6 is a block diagram illustrating the processes involved inproviding network services in accordance with one or more embodiments ofthe invention.

FIG. 7A and FIG. 7B illustrate a mechanism for providing networkservices in accordance with one or more embodiments of the invention.

FIG. 8A and FIG. 8B illustrate the process for handling a request to aWeb Service in accordance with one or more embodiments of the invention.

FIGS. 9A and 9B illustrate the process for generating WSDL data inaccordance with one or more embodiments of the invention.

FIG. 10A and FIG. 10B illustrate the process for invoking a Web Servicein accordance with one or more embodiments of the invention.

FIGS. 11A and 11B illustrate the process for dynamically handling WebService objects and the creation and execution of operations objects inaccordance with one or more embodiments of the invention.

FIG. 12A and FIG. 12B illustrate the process for utilizing rule basedserializers and deserializers in accordance with one or more embodimentsof the invention.

SUMMARY OF THE INVENTION

An embodiment of the invention is directed to a method and apparatus forautomatically providing network services in a way that improves upon theprior art. Systems implementing aspects of the invention can, forinstance, provide developers with a mechanism for creating Web Serviceswithout having to write low-level SOAP, XML, or WSDL code. The systemutilizes a rule-based approach that enables administrators and otherusers to dynamically adjust the system to include or exclude certainnetwork services without having to engage in a complex redeploymenteffort.

The term network services as it is utilized herein, means the provisionof a requested service between two or more parties using a client-serverarchitecture to communicate data relating to the requested service.Typically, client computers request services from a server computer. Theserver is configured to dynamically provide the requested service byinterfacing with one or more rules and data sources to obtain the dataneeded to perform the requested service.

A type of network service referred to as a Web Service is an example ofa widely used network services. Web Services are supported by severalstandards for posting requests between clients and servers, and forencoding streams of data/objects. In one embodiment of the invention,requests and responses are posted between clients and servers usingHTTP, and data messages relating to the provision of the requestedservice are encoded using SOAP. In such instances, these Web Servicesare supported using the WSDL to describe XML data objects.

Systems implementing one or more aspects of the invention utilize ahighly modularized architecture. These modules are built around a ruleengine that can infer most aspects of the system's behavior.

At the receiving end of the system, the requests are analyzed to checkwhether a request is destined for a network service (e.g., a WebService). When the system receives a request for a Web Service, thesystem parses the message contained in the request under the supervisionof the rule engine which can determine: the name of the Web Service, theoperations necessary to respond to the request, and the arguments thatallow the operations to execute and generate a response.

The system is capable of invoking the rule engine at any step of theprocessing and can evaluate request values on invocation. This abilityprovides administrators or users with a mechanism for dynamicallyreconfiguring the system with requiring redeployment of the entiresystem. Thus, an embodiment of the invention allows updates or changesto the system without requiring a start and stop of the system.

One aspect of the invention relates to implementing the capability togenerate rules to govern such processing. Embodiments of the inventioninclude an assistance tool that enables developers to specify the dataschema of one or more data sources, the names of Web Services to beimplemented, and other parameters relating to the Web Service such asproperties and configuration parameters. In addition, the assistancetool, or simply the network services assistant, is capable of reverseengineering the schema and including the schema information into the webservices definitions. The developer is also able, using the networkservices assistant, to manually add functionality to the system byentering specific rules. Once the network services assistant obtains thedata schema and a set of configuration parameters the network servicesassistant generates a set of rules utilized by the rule engine atrun-time. These rules direct the network services assistant to executethe proper component in order to handle a Web Services request.

The architecture implemented by one or more embodiments of the inventionimproves upon current systems in that it allows for greater control overthe handling of inputs, processing and the generation of outputs duringthe provision of network services. Furthermore, by concentrating thecontrol mechanism in a rule system, the architecture allows a developerto drastically change the system's behavior simply modifying rules,without requiring alteration of the source code modules associated witheach network service.

DETAILED DESCRIPTION

Embodiments of the invention are directed to an improved method andapparatus for automatically providing network services. In the followingdescription numerous specific details are set forth in order to providea more thorough understanding of the invention. In some instances,well-known features have not been described in detail so as not toobscure certain aspects of the invention. It will be apparent, however,to an artisan of ordinary skill, that it is possible to practice thepresent invention without these specific details or by using well-knowtechniques, equivalents or alternatives to the specific examples given.As such, this detailed description of preferred and alternativeembodiments should not be construed to limit the scope or breadth of thepresent invention. The claims and the full scope of any equivalents arewhat define the meets and bounds of the invention. Moreover, the readershould note that the invention described herein leverages technologiesdescribed in U.S. patent application Ser. No. 09/618,390 entitled“Dynamic Generation and Automated Distribution of User Interface fromDatabase model” (filed on Jul. 18, 2000) and incorporated herein byreference.

Terminology

Throughout the following disclosure, the term user refers to a personusing a computer application and/or to one or more automatic processes.The automatic processes may include a computer program executing locallyor on a remote computer, and may be triggered to communicate withembodiments of the invention following an event. Usage of the termclient is without distinction as to whether the client is a user'sapplication, a client machine or another server.

The term server is used to refer to any functional entity that providesservices to a requestor. Thus, the term server can refer to a set of oneor more physical machines or software executing on one or more machines.It should be clear to a person of ordinary skill in the art of computerprogramming that the term machine may refer to the physical hardwareitself, or to a virtual machine such as a JAVA Virtual Machine (JVM), oreven to separate virtual machines running different Operating Systems onthe same physical machine and sharing that machine's computingresources.

It should be assumed that references made to client and serverconnections, or even generalized network connections, do not necessarilyinvolve the user of a physical network such as an Ethernet network.Clients and servers may reside on the same machine and thus suchconnections can be local to one machine. This is the case, for example,on web sites running on a supercomputer. In the latter case, both webservers (e.g. Apache™ Web Server) and one or more Application Serversmay execute within the same physical machine or on different virtualmachines. The network connecting the virtual machines is in this case avirtual network. Embodiments of the invention are capable of running onsuch virtual networks.

The term data source refers to any mechanism or protocol for storing andretrieving computer data files. In its simplest form, a data source is aflat file residing on a file system. However, an electronic mail server,or a directory services server (e.g., an Lightweight Access DirectoryProtocol, etc. . . . ), a database, or any other type of data repositorycan all function as data sources. Thus, references to the term databaseare interchangeable with the term data source. In the case of relationaldatabases, a schema is conventionally used (e.g. star schema) to referto the structure/organization of data in the relational database.Therefore, throughout this disclosure references to a database schemashould be viewed as referring to the general data structure ororganization that distinctly characterizes the data source in question(e.g. electronic mail server or directory services server). Moreover,the term developer as used herein is not limited to those with computerprogramming skills, but means any computer user or person regardless ofthe level of technical skill associated with that person.

The invention is implemented as a computer program based on amodularized architecture as will be detailed below. The system isdesigned to implement each component as a part of a large infrastructure(e.g. within an Application Server) or as a plug-in or applet embeddedwithin, or interfaced with third party applications.

High-Level System Overview

FIG. 1 is a block diagram depicting an architecture for enabling systemsto provide network services such as Web Services. When client 150 issuesa request to a system implementing the invention, application server 140initially handles the request by performing multiple checks to determinethe validity and/or type of the request being made. Application server140 contains one or more components for handling these requests and may,for instance, utilize these components to determine what object type tomap a particular request.

Application server 140 is configured to have the ability to check one ormore rules associated with the request against rule store 130. Rulestore 130 provides a rule set for accessing, manipulating and/or servingdata from a data source such as database 120. Developer 100 defines therule set contained within rule store 130 and may, for instance, manuallyinput rules and/or utilize the network services assistant 110 describedherein to construct rules for accessing data in one or more data sources(e.g., database 120) and providing network services relating to thatdata.

The network services assistant allows a user to easily developserver-side services and publish those services to a client-sideapplication. For example, when a service is created and a systemimplementing one or more aspects of the invention adds operationsrelating to that service, the service provider can publish a documentcontaining a Uniform Resource Locator configured to enable the client toautomatically connect back to the proper service. Also, in thearchitecture provided by the invention, simply changing the rules caneasily change a system's behavior.

FIG. 2 illustrates the steps for developing and serving network servicesin accordance with one or more embodiments of the invention. At step210, a system implementing the invention receives a developer's input.In the large majority of cases, but not all cases, a developer throughthe use of the network services assistant selects one or more datasources (e.g. relational databases, Lightweight Directory Access,Electronic mail systems, etc. . . . ) and inputs one or more parametersrelating to the selected data source. Some examples of such parametersinclude data defining subsets within the data source, the creation ofaliases, constraints on a particular data selection, or data used toclassify and define a type of data within the data source.

At step 220 the system obtains information about the data source. Thisinformation describes the structure and organization of the data in thedata source. In the case of a relational database, the information is arelational schema that describes how data fields are organized in thedatabase tables and how tables are linked to each other in the database.In select embodiments of the invention the system obtains the relationaldatabase schema via a flat file or any other data source. The system isalso capable of reverse engineering a relational database to generate adescription for the database. At step 220, a system implementing theinvention may use one or more database connectivity interfaces (e.g.JAVA Database Connectivity “JDBC” or Open Database Connectivity “ODBC”)to connect to a relational database and obtain an appropriate databaseschema.

The system can analyze the data source information to determine the datatypes (e.g., step 230) and may also determine the hierarchy of linksbetween data fields and the properties and the operation typesassociated with those data fields. In some instances, this determinationinvolves utilizing the relational database schema to ascertain whichfields certain users may alter. Such information provides a mechanismfor defining privilege levels within the data source. At step 240, thesystem generates rules for accessing the database. These rules definewhat operations can be performed upon the data source and may, forinstance, define what type of information is in the database, how toobtain certain data within that database and what users are authorizedto access that data.

At step 250, the system obtains a set of configuration rules thatfunction at a layer above the rules for accessing the database. Theseconfiguration rules define a set of further constraints for interactingwith the data source. In one or more embodiments of the invention, thislatter step includes obtaining input from a developer through aspecialized tool for generating such configuration rules (e.g., thenetwork services assistant). The system can also obtain configurationinformation from other sources of data such as flat files, computerprograms, or LDAP servers. Once the system obtains input defining theconfiguration rules, the system can generate a set of configurationrules (see e.g., step 260) that determine the system's behavior atruntime. Configuration rules define, for example, whether a networkservice is to be made accessible to certain users and can provide a wayto control the level of accessibility to operations associated with eachnetwork service.

Network Services Assistant

Embodiments of the invention utilize a network services assistantconfigured to assist developers with the creation of the source coderequired to provide network services to requesting users. The networkservices assistant may, for instance, allow a developer to view the dataschema, determine what networks services are available, and implementthose services by configuring the operations and other propertiesassociated with each service. The network services assistant mayindependently perform one or more aspects of the functionality describeherein. In some case, for example, the term network services assistantand system are interchangeable in that the network services assistantmay, but is not required to, perform all or only some of the functionsdescribed as being performed by the network services assistant. Thus,the reader should note that the system itself or other software modulesindependent of the system can also perform the functions described asbeing performed by the network services assistant.

A. Obtaining a Data Source Schema

FIG. 3 depicts an example interface for providing schema information toassist with the configuration of network services. The interfacecomprises a set of display regions 310 that optionally contain one ormore other display elements (e.g. 320, 330 and 410). Each of thesedisplay elements or regions are rendered to present the developer with aseries of design choices. Display element 320, for instance, lists a setof network services (e.g. Web Services 322, 324, 326 and 328) thedeveloper may implement. The network services assistant also provides amechanism for inputting a database schema or simply providing connectionparameters to a data source. For example, by providing a user name,password and database connection protocol (e.g. ODBC, JDBC) a developermay connect to a data source such as a relational database. Once theappropriate database is identified, the network services assistantconnects to the database for purposes of retrieving the database schema.In instances where a schema is not available, the network servicesassistant applies a reverse engineering function to the database inorder to obtain the schema information.

Once obtained, the schema is displayed in display region 330. In FIG. 3,for instance, display region 330 contains three database tables. Thenetwork services assistant is capable of determining the relationshipsbetween one or more database tables and can traverse the hierarchy oftables to define network services that require the use of multipletables. In FIG. 3, the assistant located two relationships: one betweentable 332 and table 334, and a second one between table 333 and 334.Each table has a primary key (e.g. tbl_1_id, tbl_2_id and tbl_3_id) thatis unique to each record in the table. Primary keys are further used tolink records from two or more tables into an association table. Forexample, in FIG. 3 table 334 is an association table that allows thesystem to associate tables 332 and 333. The system utilizes theserelationships to determine the hierarchical structure of the fields in adatabase. Once the system determines such a structure, this relationalmapping is used to provide data needed for purposes of providing networkservices. If data from multiple tables is required, the system is ableuse the hierarchical structure to determine how and where to obtain therequired data.

B. Implementing Network Services

In addition to providing developers with an interface for obtaining andviewing data source information, the network services assistant allowsdevelopers to utilize a set of network services (e.g., individual webservices or a set of web services that make up a transaction). In oneembodiment of the invention, the network services available to thedeveloper are shown within display region 320. The services illustratedin FIG. 3, (e.g., services 322, 324, 326) provide a way to access datafields (e.g., tbl_1_field_1, tbl_1_field_2), (tbl_1_field_1,tbl_2_field_4) and (tbl_1_field_2, tbl₂_field_3).

The network services assistant also allows the developer to createnetwork services that manipulate data from the database. Network service328, for instance, is designed to execute an operation that returns thesum of a particular data field or fields from one or more tables. Toperform operations that utilize data from the database, the networkservices assistant dynamically evaluates a set of predefined rules, usesthose rules to retrieve the data needed to perform the operation,performs the operation and returns an appropriate result.

FIG. 4 shows an example of the graphical user interface components usedto provide developers with the information needed to configure a networkservice. This is accomplished in one or more embodiments of theinvention through the use of a graphical user interface that contains aset of display regions designed to allow developers to create operationsrelating to a particular service. In the example given, display region410 shows a set of operations 402, 403, 404 and 405 that relate tosearching a given data source as well as inserting, deleting andupdating that data source.

The interface also provides developers with a mechanism for controllingthe system's ability to define new operations associated with aparticular service and add those new operations to the developmentprocess. For example, the developer may program a set of routines andadd the routines to the default set of operations associated with eachnetwork service that has a use for such routines.

In addition to having the ability to manipulate operations relating to anetwork service, the system also provides users with a way to handleproperties associated with each defined operation. An available set ofproperties associated with each operation are depicted, for example,within one or more components of the graphical user interface. In theillustration contained herein, display region 410 depicts properties406, 407, 408 and 409. The properties are associated with a particularoperation and define how the system behaves at runtime when executingthe operation. An example of a simple property would be a property thatindicates whether a particular operation is available or not. Forexample, if a data field in a database may not be altered or erasedthrough the use of a web service, update operation 405, and deleteoperation 404 are simply flagged as “not available.” The properties ownattributes may not only affect the way a system handles a client'srequest, but also affect what type of response data is generated and howthat data is transmitted to the client.

C. Generating Rule Sets

Once the data schema associated with the data source needed to perform anetwork service is obtained, a network service or set of networkservices are defined, and the developer sets the operations andproperties relating to the service, the network services assistantgenerates a set of rules stored in rules store (e.g. flat files loadedby a rule engine). In one or more embodiments of the invention theprocess of generating the rule is made fully automatic.

FIG. 5 illustrates the steps involved in the process of generating rulesets that govern the creation and serving of network services. At step510, the network services assistant obtains the database schemaassociated with the target data source (see e.g., step 210 describedabove). In one or more embodiments of the invention, the networkservices assistant utilizes a graphical user interface or some otherinterface, as described in FIG. 3, to capture user input and integratethat input with information collected from one or more data sources(e.g., the schema data). At step 520, the network services assistantanalyzes the database information by checking the data type associatedwith each field of the database, identifying links between the databasetables, and determining the hierarchical structure of the data in thedatabase. The network services assistant may then generate a set ofrules for querying the database (see e.g., step 530) and for modifyingor otherwise handling data fields in the database (see e.g. step 540).The system embodying one or more aspects of the invention can alsogenerate a set of operational rules for accessing the database. Theserules are typically stored in the rule store and used at runtime todetermine how and when to create one or more query objects in responseto a client request. When the system elects to create a query object,information such as database specific, table specific and field specificprivileges are typically examined. The operational rules define the typeof information that may be embedded in a query object and utilized whenaccessing the database to add, retrieve or alter data.

At step 560, the network services assistant generates a set ofoperational rules for translating the data into a format compatible withone or more destination protocols serving data to a requesting client.The system can, for instance, translate the data served in response to aclient request into Web Services Description Language. The data isfurther serialized for transmission to clients using one or morecommunication protocols. In one embodiment of the invention, thecommunication protocol of choice is SOAP. However, the system mayutilize any protocol capable of providing network services to transmitdata to the client.

Providing Network Services

FIG. 6 is a block diagram illustrating the processes involved inproviding network services utilizing one or more embodiments of theinvention. In the example that is given, client 150 issues a request fordata. A request converter 610 that utilizes one or more software modulesto analyze the request. typically handles this request. The requestconverter may, for instance, verify the validity of a web service nameand determine if the appropriate parameters are passed with the requestand the requested operations. The request converter may also combinerequest information with data provided by the execution environment. Thesystem may, for instance, integrate session information and/orinformation obtained from electronic cookies with the request analysis.In an embodiment of the invention, the request converter parses SOAPformatted data received as XML text to convert the request data into arequest object.

An example of a type of request object is an object orientated class(e.g. JAVA coded class object) capable of storing request data, andenabled with one or more operations (e.g. mutators) invoked to retrievethe request data from the request object.

The request converter may utilize a rule engine 640 built usingartificial intelligence tools. In one embodiment of the invention, therule engine contains an inference engine capable of executing a chain oflogical steps using rule data obtained from one or more rule datasources (e.g. 130). The rule engine is configured to interface withmultiple system components and thereby allows the system to invoke therule engine at multiple levels and throughout different stages of thedata processing event. Moreover, operators of the system (e.g.developers, maintainers or even the end user) can modify one or morerule stores which result in the changes to the system's behavior withoutrequiring modifications to the rule engine's program code.

After the request converter creates a request object, a query generator630 generates a query to obtain data from its data source (e.g. 120).The query generator invokes the rule engine to determine the conditionsthat apply to generating a query to a data source based on the datasource's access privilege parameters and the content of the requestobject. For example, a request aimed at retrieving a person's personaldata stored in a relational database would cause the query generator toinvoke the rule engine to determine the client's access privileges andthe access authorization parameters. The developer can explicitly setthese authorization parameters or the system can automatically generatesuch parameters using access privileges stored in the database. Inembodiments of the invention, the query is an object oriented classcapable of storing data and enabled with operations. The system mayinvoke these operations to retrieve data from the object or access datasources associated with the object.

Response generator 620 depicted in FIG. 6, represents a program module(or a set thereof) capable of converting the data obtained from a datasource through the query object into response data suitable to betransmitted using one or more transmission protocols. Response generator620 contains one or more mechanisms for invoking rule engine 640 whichprovides response generator 620 with conditions to generate a response.Rule engine 640 may, for instance, determine on behalf of responsegenerator 620 that the responses for a specific network service are tobe transmitted in a specific protocol (or data format). For example,rule engine 640 may determine that all requests for data having fullread-access privileges in the database should be formatted in HTML.Response generator 620 could obtain data stored in object-orientedobjects and convert that data into the format designed for transmissionon a network.

In an embodiment of the invention, data obtained from querying the datasource is converted to one or more objects represented in Web ServicesDescription Language format. The latter objects are then encoded usingthe SOAP format for transmission back to the client 150.

FIG. 7A and FIG. 7B illustrate the mechanism by which a system embodyingthe invention provides network services. FIG. 7A is a flowchartillustrating steps involved in the process of providing networkservices. The process begins by collecting information about the datasource and receiving a developer's input at step 710. This step istypically conducted using the network services assistant describedabove, although the system may manually obtain the information collectedas well as the developer's input or use one or more other developer'stools.

At step 720, embodiments of the invention generate descriptors for thenetwork services the system is capable of utilizing. These networkservice descriptors are a set of rules and templates that define aspectsof the network services to be provided. Such network service descriptorsmay, for instance, define a network service name, one or more operationsassociated with the network service and rules that may define accessprivileges to the operations.

At step 730 a system embodying the invention generates operational rulesthat allow, for example, an engine to generate database queries inresponse to a network services request and process response data asdescribed above in FIG. 2. When generating a response to a request, therules are utilized to convert data from one representation (e.g.relational database) into a format such as Web Services DescriptionLanguage designed for data communications. At step 740, the systemreceives a request from client 150 (see e.g., FIG. 6 description). Inits one implementation, the invention utilizes an application server(e.g. 155) that performs all steps of the present invention. However,alternative implementations are contemplated as within the scope of theinvention defined herein. The invention may, for instance, make use ofsoftware modules (sometime called plug-in modules) designed forimplementation in third party application servers or any other softwareprogram designed to provide network services.

At step 750, the system checks the operational rules discussed herein byinvoking rule engine 640 and carrying out the processes, described inFIG. 6, for validating a request and converting that request into anobject oriented representation. The rules are typically generated via adeveloper application such as the network services assistant describedthroughout. At step 760, the system generates a query to access one ormore data sources following a set of rules that associate data sourceswith network services. At step 770, the system applies the rule set byretrieving the data from one or more data sources, converting the datain accordance with one or more communication protocols and transmittingthe data to the client.

Although the description set forth so far utilizes the term networkservices, the reader should note that one or more embodiments of theinvention are applied to providing a type of network service(s) calledWeb Service(s).

Handling a Request to a Web Service

FIG. 8A and FIG. 8B illustrate the process by which a system embodyingthe invention handles requests made to a Web Service. At step 810, thesystem receives a request from Web Service client 150. A request to aWeb Service is an XML coded message, typically, using SOAP. The systemcan submit the message directly to a server through a network socket orusing HTTP. For example, the Web Service request may be received overHTTP as the following:

http://www.foo.ext/path/ServiceName?wsd1

Upon receipt of the request, the request message is directed to a module(e.g., request handler 850) configured to enable the system tocommunicate with rule system 852. The rule system comprises a ruleengine 640, a rule store 130 and multiple components (not shown) thatallow the rule system to interface with other components in the system(e.g. an Application Server), or to integrate (as an embedded applet ora plug-in) within third party applications. Utilizing the capabilitiesof the rule system 852, the request handler 850 infers, using the nameof requested Web Service and the arguments contained in the request, thecomponent that is capable of generating the Web Service response. Atstep 820, the system instantiates the WSDL-generating component. Block854 represents the module that creates the WSDL-generating component.The latter is interfaced with the rule system 852, and is capable ofinferring the name of the operation to be invoked to generate a WebService response. At step 830, the WSDL-generating componentinstantiates one or more operations that allow the system to communicatewith data sources. Block 856 represents a process that enables theWSDL-generating component to instantiate the operations required togenerate the WSDL response. At step 840, the system generates the WSDL,while utilizing the rule system to determine the conditions associatedwith the WSDL-generation. The WSDL-generating component then returns theWSDL data to the system that, in turn, forwards the data to the client.

FIGS. 9A and 9B illustrate the process by which systems embodying theinvention generate WSDL data. At step 910, the system utilizes the rulesystem to infer the names of the components capable of handling therequest, and the names of all the operations in the service. At step920, the system infers, for each operation's name, which component is togenerate WSDL content. Modules 952 and 954 both interface with the rulesystem and are capable of invoking the rule system for inferringcomponent names and operations. At step 930, the system creates aninstance for each operation class found at step 920. At step 940, thesystem infers the WSDL data content values such as input names andtypes, output names and types, parameter ordering, operation name,schema types, binding name and all other information that the systemrequires to execute the operations and generate the WSDL content. Thelatter step allows the system to condition the WSDL output without hardcoding the WSDL generation specifications in the WSDL generationcomponent itself as it is common use in prior art. In the invention WSDLgeneration rules are input in the rule system. The latter approachallows for a greater flexibility in the system's behavior. Thus, usersof the system are not required to manually create WSDL to initiate a WebService.

At step 950, the system executes the operations having content specificto each one of the operations. At step 960, the WSDL-generatingcomponent merges the WSDL content from each component into a servicewide WSDL document to be returned to the client.

Handling a Web Service Invocation

FIG. 10A and FIG. 10B illustrate the process by which a system embodyingone or more aspects of the invention handles the invocation of a WebService. Before invoking a Web Service operation the system receives aSOAP message, or an HTTP request, from a Web Services client (e.g., step1010). A typical example of an instance where Web Services areapplicable involves a creating a request to search a database. Therequest may be a Uniform Resource Locator (URL) that contains the nameof the Web Service and one or more parameters indicating, for instance,a search word or phrase. The request may also contain output parameters,such as sorting information or a search category. Block 1051 representsone or more application server modules for handling the receipt ofnetwork connections and forwarding of requests to the proper requesthandler. At step 1020, the application server determines whether therequest is destined to a Web Service. If the request does not target aWeb Service, the application server forwards the request to the properserver component for handling requests of that type. If the requesttargets a Web Service, the application server routes the request to aSOAP processor 1052. In one embodiment of the invention, SOAP processor1052 is an application component capable of parsing the message encodedin accordance with SOAP (which utilizes XML), and converts the data intodata structures, objects and classes (e.g., in an object orientedsense). In one embodiment of the invention, SOAP processor 1050 containsAXIS software (developed by the APACHE Group).

SOAP processor 1050 extracts a SOAP message from the HTTP request (e.g.,step 1030) and converts the SOAP request message into request objects.The conversion process involves a rule-based serializer/deserializer1054, which is a module that is interfaced with the rule system.Serialization refers to the process that enables the system to convertblocks of structured data (e.g. data structures, classes etc) intostreams of data. Systems frequently utilize the process of serializationto transfer data between the different nodes in a network. Thedeserialization process does the opposite by assembling streamed datainto structured blocks of data. The deserializer of block 1054, receivesSOAP information and converts it into structured data under control ofthe rule system.

At step 1050, a system embodying the invention invokes a dynamic WebService Handler 1056 while submitting arguments such as the servicename, operation name, request objects created in the previous step, andother information provided by the application server (e.g., such assession information). At step 1060, the system executes one or moreoperations and typically retrieves data from one or more data sources.The result of executing the operations is an array of model dataobject(s).

Once obtained, the system returns these data objects to SOAP processor1052 (e.g., step 1070) which utilizes serializer 1054 to convert datafrom object based data to streamed data. SOAP processor 1052 handles thestreamed data by converting that data into XML. SOAP processor 1054 hasthe ability to invoke the rule system and thereby allow the system toexert control over the way data in preparation for transmission over thenetwork. At step 1080, the system returns the data in its serializedform to one or more Web Services clients.

FIGS. 11A and 11B illustrate the process by which a system embodying theinvention dynamically handles Web Service objects as well as thecreation and execution of operations objects. FIGS. 11A and 11B furtherexpand upon the description relating to step 1050 shown in FIG. 10A. Atstep 1110, the system invokes a dynamic Web Service handler 1152 witharguments as described above.

At step 1120, the Web Service handler infers the class name of theoperation handler 1154 defined for this invocation and some environmentsettings (e.g., entity name, task and service name). At step 1130, thesystem instantiates the corresponding class for one or more targetoperations. Operation handler 1154 interfaces with rule system 956 andcan thereby utilize the rule system to supervise class instantiation andthe execution of the various operations. Through the rule system, theoperation handler 1154 has access to invocation parameters and variablessuch as the mapping between the public name of attributes (exposed asarguments) and the corresponding internal names used for datamanipulation. Operation handler 1154 can also obtain the value ofarguments used to invoke the operation.

Rule system 956 also provides object entity types identifying the sortof objects the operation is intended to work with. Providing targetentity types is important because it allows system components to utilizea single class to handle multiple different entity types. For example,in a system referred to as Direct to WebServices™, one class a series ofoperations (e.g., search, insert, delete, and update) is invoked toautomatically handle many different types of entities. Furthermore,operation handler 1154, is able to determine, through the rule system,whether to immediately commit (or not commit) changes to its objectgraph. The system then executes the operations (e.g., step 1140) andreturns the results of the execution to the SOAP processor (e.g., step1150).

FIG. 12A and FIG. 12B illustrate the process by which a system embodyingthe invention utilizes rule based serializers and deserializers. As wasnoted above, serialization is an important aspect for networkcommunications. At step 1210, the SOAP processor invokes a deserializer1254 to unmarshall data objects referred to in one embodiment of theinvention as Enterprise Objects. At The deserializer utilizes rulesystem 956 to infer a mapping between Web Service input part names andentity attributes (e.g., step 1220) and returns the deserialized objectmodels to the SOAP processor (e.g., at step 1230).

At step 1240, the system invokes the dynamic Web Service handler withinput part values (including deserialized model objects). At step 1250,the result object(s) of the web service invocation are returned to theSOAP processor for serialization (e.g., step 1252). Serializer 1252 isinterfaced with the rule system and can thereby convert result objectsinto XML using a set of serialization rules. The rule-based serializercan infer the conditions for data serialization at multiple steps. Forexample, the serializer infers which attributes to serialize, themapping of an entity attribute name to XML property name, the order inwhich to serialize properties, and any other serialization rule input bya developer or a user into the rule system. The SOAP processor has theability to generate one or more SOAP messages (e.g., step 1260) and canreturn generated SOAP messages to the client (e.g., step 1270).

Thus a method, system and apparatus for automatically providing networkservices (e.g. Web Services) has been described. The invention improvesupon existing methods for providing network services by reducing thetime and effort required to initiate use of these network services. Adeveloper can, for instance, automatically generate several differenttypes of rules and use those rules with a rule system interfaced withone or more application server components. Thus, the system provides away to control how requests to network services are handled, data isretrieved from data sources and manipulated, and output is generated.

1.-32. (canceled)
 33. A network services assistant embodied in acomputer program executed in a tangible medium of expression, thecomputer program comprising computer program code configured to: analyzea database schema of a database to determine a hierarchical structure ofat least a portion of the database; generate based at least in part onthe analysis of the database schema a set of rules associated with thedatabase; and store the set of rules in a manner that makes the set ofrules available to a rule engine configured to implement them.
 34. Thenetwork services assistant of claim 33, wherein the computer programcode is further configured to provide an object description for buildingentities to store data.
 35. The network services assistant of claim 33,wherein the computer program code is further configured to provide anobject description for accessing data in the database.
 36. The networkservices assistant of claim 33, wherein the computer program code isfurther configured to generate a hierarchical structure involvingmultiple database tables.
 37. The network services assistant of claim33, wherein the computer program code is further configured to provide adata type for each of at least a subset of database fields comprisingthe database.
 38. The network services assistant of claim 33, whereinthe computer program code is further configured to generate the set ofrules based at least in part on user input.
 39. The network servicesassistant of claim 33, wherein the set of rules includes operation rulesfor utilizing the database.
 40. The network services assistant of claim33, wherein the set of rules includes operation rules for translating anoutput of a query to the database into one of a plurality of datacommunication languages.
 41. The network services assistant of claim 40,wherein operation rules for translating the output include rules forgenerating data compatible with SOAP.
 42. The network services assistantof claim 40, wherein operation rules for translating the output includerules for generating data compatible with Web Services DescriptionLanguage.
 43. The network services assistant of claim 33, wherein theset of rules includes operation rules for querying the database.
 44. Thenetwork services assistant of claim 33, wherein the set of rulesincludes operation rules for modifying database fields of the database.45. The network services assistant of claim 33, wherein the set of rulesincludes controls for handling database transactions.
 46. The networkservices assistant of claim 33, wherein the set of rules includesoperation rules for accessing at least a subset of database fieldscomprising the database.
 47. The network services assistant of claim 46,wherein operation rules for accessing include handling user privilegesat run time.
 48. A method for providing web services comprising:analyzing a schema of a data source; generating a plurality ofdescriptors for a plurality of web services based at least in part onthe schema; generating a plurality of operational rules associated withthe plurality of web services; making the plurality of operational rulesavailable to a rule engine configured to implement the plurality ofoperational rules; and providing one of the plurality of web servicesupon receiving a request containing at least a corresponding one of theplurality of descriptors including by executing one or more of theplurality of operational rules, building a request for accessing thedata source, accessing the data source, and returning data in a dataform based on a web services protocol.
 49. The method of claim 48,wherein the data source comprises a relational database having aplurality of tables and a plurality of relationships linking theplurality of tables.
 50. The method of claim 48, wherein the data sourceuses directory services.
 51. The method of claim 48, wherein generatinga plurality of descriptors comprises generating a publishable name todescribe each one of the plurality of web services.
 52. The method ofclaim 48, further comprising automatically generating a set ofoperations for accessing the plurality of web services.
 53. The methodof claim 52, wherein automatically generating the set of operationscomprises automatically generating a set of functions for accessing thedata source.
 54. The method of claim 53, wherein the set of functionscomprises at least one function for adding data to the data source. 55.The method of claim 53, wherein the set of functions comprises at leastone function for deleting data from the data source.
 56. The method ofclaim 48, wherein generating the plurality of operational rulescomprises generating a set of conditional statements each of which iscombined with an execution statement.
 57. The method of claim 48,wherein the plurality of operational rules comprises a hierarchicalstructure defining a precedence of each rule within the plurality ofoperational rules.
 58. A method for automatically providing web servicescomprising: receiving from a client a request comprising a web serviceand zero or more argument data; generating a request object; checkingthe request object against one or more operational rules using a ruleengine; and performing the following in the event it is determined basedon the checking that the request object is permitted: generating a queryto a data source; obtaining data from the data source by submitting thequery; building a response data entity; generating a response object;generating response data using the rule engine; and transmitting theresponse data to the client.
 59. The method of claim 58, whereinreceiving the request comprises receiving a function name and zero ormore function arguments.
 60. The method of claim 58, wherein receivingthe request comprises receiving an alias associated with the webservice.
 61. The method of claim 58,-further comprising determiningwhether the request requires dynamic handling.
 62. The method of claim58, further comprising examining a header contained in the request,wherein the header bears information for requesting access to the webservice.
 63. The method of claim 58, wherein the request objectcomprises a data structure for storing request information contained inthe request.
 64. The method of claim 63, wherein the request objectcomprises at least one function for accessing and manipulating therequest information.
 65. The method of claim 58, wherein checkingcomprises verifying a name of the web service.
 66. The method of claim58, wherein checking comprises verifying a type of each of the zero ormore argument data.
 67. The method of claim 58, wherein building theresponse data entity comprises generating the data entity using WebServices Description Language.